﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using Recaptcha;

namespace Contour.Contrib.Controls
{
    [System.Web.UI.ValidationProperty("IsValidString")]
    public class ReCaptchaCustomControl : RecaptchaControl
    {
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.Validate();
        }

        public string IsValidString
        {
            get {
                if (this.IsValid)
                {
                    return this.IsValid.ToString();
                }
                else
                {
                    return String.Empty;
                }
            }
        }
    }
}